if (BUILD_LUAFILTER)
  find_package(Lua)
  if(LUA_FOUND)
    include_directories(${LUA_INCLUDE_DIR})
    add_library(luafilter SHARED luafilter.cc luacontext.cc)
    set_target_properties(luafilter PROPERTIES VERSION "1.0.0" LINK_FLAGS -Wl,-z,defs)
    target_link_libraries(luafilter maxscale-common ${LUA_LIBRARIES})
    install_module(luafilter experimental)
  else()
    message(STATUS "Lua was not found, luafilter will not be built.")
  endif()
endif()
